using UnityEngine;
using System.Collections;

[System.Serializable]
public class NavPoint : MonoBehaviour {
	
	public NavPoint next;
	public string nameOfNavPoint;
	public float threshold = 1.5f;
	
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void OnDrawGizmos() {
		Gizmos.DrawWireSphere(transform.position, threshold);
		if (next != null) {
			Gizmos.DrawLine(transform.position, next.transform.position);	
		}
	}
	
	void OnDrawGizmosSelected() {
		Gizmos.color = Color.yellow;
		Gizmos.DrawWireSphere(transform.position, threshold);
		if (next != null) {
			Gizmos.color = Color.green;
			Gizmos.DrawLine(transform.position, next.transform.position);	
		}
	}
}
